import React from 'react'
import style from './style'
import Button from '../button'
import Link from '../link'
import cx from 'classnames'

export default ({text, label, descr, add, link, back, nav, children, className}) => (
  <div className={cx({
    [style.root]: true,
    [className]: className
  })}>
    {
      nav?
      <ul>
        {
          nav.map((v, i)=>{
              return <li key={i} className={cx({[style.active]: v.active})}><Link to={v.link} label={v.label}/></li>
            }
          )
        }
      </ul>
      : null
    }
  </div>
)
